home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00b.txt
/
000073_icon-group-sender _Wed Oct 11 14:45:00 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id OAA08274
for icon-group-addresses; Wed, 11 Oct 2000 14:42:08 -0700 (MST)
Message-Id: <200010112142.OAA08274@baskerville.CS.Arizona.EDU>
From: Steve Wampler <swampler@noao.edu>
X-Newsgroups: comp.lang.icon
Subject: Re: can icon do this?
Date: Wed, 11 Oct 2000 10:47:11 -0700
X-Trace: noao.edu 971286434 35547 140.252.38.6 (11 Oct 2000 17:47:14 GMT)
X-Complaints-To: abuse@noao.edu
To: Antonella <gea@earthling.net>
X-Accept-Language: en
To: icon-group@optima.CS.Arizona.EDU
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 656
Antonella wrote:
>
> What code inspects one input text file, checks each line for occurrences
> of a string, and if found replaces that string in an otherwise identical
> output file?
Sure, this is possible to do in Icon, but if the output file really
starts out identical to the input file, it's a *lot* easier to
read the input file, modify the internal copy and then write it
out as the new output file. Is that acceptable?
Otherwise, you have to be careful if the length of the target and
replacement strings differ - this introduces a spot of ugliness
in the code.
--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler@noao.edu